
package org.lottery.panel;

import com.tool.btn.FormsOnOffBtn;
import com.tool.image.ImageMixDeal;
import com.tool.role.RoleData;
import com.tool.tcp.Sprite;
import com.tool.tcp.SpriteFactory;
import com.tool.tcpimg.UIUtils;
import com.updateNew.MyIsif;

import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.LayoutManager;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;

import org.come.Frame.ZhuFrame;
import org.come.bean.ConfigureBean;
import org.come.bean.QuackGameBean;
import org.come.entity.Goodstable;
import org.come.model.Configure;
import org.come.mouslisten.WLLMouslisten;
import org.come.socket.Agreement;
import org.come.socket.SendMessageUntil;
import org.come.until.CutButtonImage;
import org.come.until.GoodsListFromServerUntil;
import org.come.until.UserMessUntil;
import org.lottery.btn.LotteryMainBtn;
import org.lottery.frame.LotteryMainFrame;
import org.lottery.mouseListener.PrizeMouseListener;
import com.tool.tcpimg.ChatBox;



public class LotteryMainPanel extends JPanel {
    ConfigureBean allConfigure = UserMessUntil.getConfigureBean();
    Map<BigDecimal, Configure> item = allConfigure.getAllConfigure();
    Configure configure7 = item.get(new BigDecimal(7));
    private JLabel[] prizeLab;
    private JLabel[] luckyDrawImg;
    private JLabel[] luckyDrawNumber;
    private JLabel[] luckyDrawName;
    private JLabel consumeGoodsImg;
    private JLabel consumeGoodsNumber;
    private LotteryMainBtn oneLotteryBtn;
    private LotteryMainBtn tenLotteryBtn;
    private LotteryMainBtn helpBtn;
    //private ChatBox box;//展示数据
    private List<LotteryMainBtn> menuBtn;
    private JLabel hintCheckbox;
    private JLabel hintContent;
    private int lotteryType = 1;
    private int moenyType = 0;
    private BigDecimal goodid;
    private BigDecimal xianyuDraw;
    private String drawName;
    //private boolean hintType = true;
    private boolean hintType = false;
    private boolean drawLottery = false;
    private int[] drawLotteryType;
    private String[] drawGoods;
    private JLabel integralLab;
    private LotteryMainBtn integralBtn;
    private ImageIcon iconBack;
    private ChatBox box;//展示数据
    static Sprite tcp = SpriteFactory.VloadSprite("resource/mouse/flicker.tcp", null);
    private int time;
    //积分抽奖界面修改
    public LotteryMainPanel() {
    	String style = MyIsif.getStyle();
if ("水墨UI".equals(style)) {
    //
    		this.setPreferredSize(new Dimension(653, 479));
            this.setOpaque(false);
            this.setLayout(null);
            this.setBackground(UIUtils.Color_BACK);
            // 关闭按钮事件
            FormsOnOffBtn offBtn = new FormsOnOffBtn("inkImg/old/2/1.png", 1, 87);
            offBtn.setBounds(653 - 37, 10, 25, 25);
            this.add(offBtn);

            getPrizeLab();
            getLuckyDrawNumber();
            getLuckyDrawImg();
            getLuckyDrawName();
            getHelpBtn();
            getConsumeGoodsImg();
            getConsumeGoodsNumber();
            getOneLotteryBtn();
            getHintCheckbox();
            getHintContent();
            getTenLotteryBtn();
            getDrawLotteryType();
            getIntegralLab();
            getIntegralBtn();
            getMenuBtn();
    	}else {
    		this.setPreferredSize(new Dimension(655, 522));
    		this.setOpaque(false);
    		this.setLayout(null);
    		this.setBackground(UIUtils.Color_BACK);
    		FormsOnOffBtn offBtn = new FormsOnOffBtn("inkImg/hongmu/s74.png", 1, 87);
    		offBtn.setBounds(632, 0, 23, 23);
    		this.add(offBtn);
    		this.getPrizeLab();
    		this.getLuckyDrawNumber();
    		this.getLuckyDrawImg();
    		this.getLuckyDrawName();
    		this.getHelpBtn();
    		this.getConsumeGoodsImg();
    		this.getConsumeGoodsNumber();
    		this.getOneLotteryBtn();
    		this.getHintCheckbox();
    		this.getHintContent();
    		this.getTenLotteryBtn();
    		this.getDrawLotteryType();
    		this.getIntegralLab();
    		this.getIntegralBtn();
    		this.getMenuBtn();
    	}

    }



    @Override
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        String style = MyIsif.getStyle();
if ("水墨UI".equals(style)) {
    //
        	if (iconBack == null) {
                iconBack = new ImageIcon("inkImg/newbackground/B322.png");
            }
            g.drawImage(iconBack.getImage(), 0, 0, 653, 479, this);

            if (drawLottery) {
                tcp.updateToTime(ImageMixDeal.userimg.getTime(), 0);
                for (int i = 0; i < luckyDrawImg.length; i++) {
                    if (drawLotteryType[i] == 1) {
                        tcp.draw(g, luckyDrawImg[i].getX() - 5, luckyDrawImg[i].getY() - 5);

                    }
                }
            }
            // 抽奖信息处理
            if (drawGoods != null) {
                if (time % 15 == 0) {
                    int i = time / 15;
                    String[] goods = drawGoods[i].split("_");
                    Goodstable goodstable = UserMessUntil.getgoodstable(new BigDecimal(goods[0]));
                    if (goodstable!=null) {
                        MouseListener[] mouseListeners = LotteryMainFrame.getLotteryMainFrame().getLotteryMainPanel().getLuckyDrawImg()[i].getMouseListeners();
                        PrizeMouseListener listener = (PrizeMouseListener) mouseListeners[0];
                        listener.setGoodsId(goods[0]);
                        LotteryMainFrame.getLotteryMainFrame().getLotteryMainPanel().getLuckyDrawImg()[i].setIcon(GoodsListFromServerUntil.imgpath2(goodstable.getSkin()));
                        LotteryMainFrame.getLotteryMainFrame().getLotteryMainPanel().getLuckyDrawName()[i].setText(goodstable .getGoodsname());
                        LotteryMainFrame.getLotteryMainFrame().getLotteryMainPanel().getLuckyDrawNumber()[i].setText(goods[1]);
                        LotteryMainFrame.getLotteryMainFrame().getLotteryMainPanel().getDrawLotteryType()[i] = Integer .parseInt(goods[2]);
                        if (Integer.parseInt(goods[2]) == 1) {
                            ZhuFrame.getZhuJpanel().addPrompt2("你获得了数量为" + goods[1] + "的" + goodstable.getGoodsname());
                        }
    				}
                    if (i >= drawGoods.length - 1) {
                        drawGoods = null;
                    }
                }
                time++;
            }
        }else {
        	if (this.iconBack == null) {
        		this.iconBack = new ImageIcon("img/lottery/抽奖w655,h522.png");
        	}

        	g.drawImage(this.iconBack.getImage(), 0, 0, 655, 522, this);
        	int i;
        	if (this.drawLottery) {
        		tcp.updateToTime(ImageMixDeal.userimg.getTime(), 0);

        		for(i = 0; i < this.luckyDrawImg.length; ++i) {
        			if (this.drawLotteryType[i] == 1) {
        				tcp.draw(g, this.luckyDrawImg[i].getX() - 5, this.luckyDrawImg[i].getY() - 5);
        			}
        		}
        	}

        	if (this.drawGoods != null) {
        		if (this.time % 15 == 0) {
        			i = this.time / 15;
        			String[] goods = this.drawGoods[i].split("_");
        			Goodstable goodstable = UserMessUntil.getgoodstable(new BigDecimal(goods[0]));
        			if (goodstable != null) {
        				MouseListener[] mouseListeners = LotteryMainFrame.getLotteryMainFrame().getLotteryMainPanel().getLuckyDrawImg()[i].getMouseListeners();
        				PrizeMouseListener listener = (PrizeMouseListener)mouseListeners[0];
        				listener.setGoodsId(goods[0]);
        				LotteryMainFrame.getLotteryMainFrame().getLotteryMainPanel().getLuckyDrawImg()[i].setIcon(GoodsListFromServerUntil.imgpath2(goodstable.getSkin()));
        				LotteryMainFrame.getLotteryMainFrame().getLotteryMainPanel().getLuckyDrawName()[i].setText(goodstable.getGoodsname());
        				LotteryMainFrame.getLotteryMainFrame().getLotteryMainPanel().getLuckyDrawNumber()[i].setText(goods[1]);
        				LotteryMainFrame.getLotteryMainFrame().getLotteryMainPanel().getDrawLotteryType()[i] = Integer.parseInt(goods[2]);
        				if (Integer.parseInt(goods[2]) == 1) {
        					ZhuFrame.getZhuJpanel().addPrompt2("你获得了数量为" + goods[1] + "的" + goodstable.getGoodsname());

        				}
        			}

        			if (i >= this.drawGoods.length - 1) {
        				this.drawGoods = null;
        			}
        		}

        		++this.time;
        	}
        }

    }

    public void getlotteryTypeGoods(int type) {
        if (this.drawGoods == null) {
            String sendMes = Agreement.getFiveMsgAgreement("CC" + type);
            SendMessageUntil.toServer(sendMes);
            this.clearView();
            this.drawLottery = false;
        } else {
            ZhuFrame.getZhuJpanel().addPrompt2("正在抽奖，请勿切换面板！！");
        }
    }

    public void getImg(int i, int num, String imgPath) {
        try {
            if (this.menuBtn.size() > i) {
                this.menuBtn.get(i).setIcons(CutButtonImage.cuts(imgPath));
                this.menuBtn.get(i).setCaozuo(num);
            } else {
                this.menuBtn.add(new LotteryMainBtn(imgPath, 1, "", num, this));
                this.add(this.menuBtn.get(i));
            }

            this.menuBtn.get(i).setVisible(true);
            this.menuBtn.get(i).setBounds(30 + i * 104, 25, 104, 40);
        } catch (Exception var5) {
            var5.printStackTrace();
        }

    }

    public void getMenuImg(QuackGameBean gameBean) {
        for(int k = 0; k < this.menuBtn.size(); ++k) {
            this.menuBtn.get(k).setVisible(false);
        }

        String menuType = gameBean.getPetmsg();
        String[] split = menuType.split("\\|");
        int j = 0;
        this.lotteryType = 1;
        this.drawName = null;

        int i;
        int num;

        for(i = 0; i < split.length; ++i) {

            if(split[i].contains("天梯奖池")) {
                continue;
            }
            if (split[i].startsWith("Y")) {
                num = split[i].indexOf("-");

                this.drawName = split[i].substring(num + 1) + "积分";
                this.lotteryType = Integer.parseInt(split[i].substring(1, num));
//                 this.getImg(i, this.lotteryType, this.lotteryType == 1 ? "skin/8100226/button/B177.png" : "skin/8100226/button/B306.png");
            } else if (split[i].startsWith("N")) {
                num = split[i].indexOf("-");
                num = Integer.parseInt(split[i].substring(1, num));
//                this.getImg(i, num, num == 1 ? "skin/8100226/button/B178.png" : "skin/8100226/button/B307.png");
            } else {
                Goodstable good = UserMessUntil.getgoodstable(new BigDecimal(split[i]));
                if (good != null) {
                	//system.out.println(good.getGoodsname());
                	//system.out.println(good.getGoodsid());
                    this.getPrizeLab()[j].setIcon(GoodsListFromServerUntil.imgpathAdaptive(good.getSkin(), 49, 49));

                    MouseListener[] mouseListeners = this.getPrizeLab()[j].getMouseListeners();
                    PrizeMouseListener listener = (PrizeMouseListener)mouseListeners[0];
                    listener.setGoodsId(split[i]);
                    ++j;
                }
            }
        }

//        for(i = 0; i < split.length; ++i) {
//        	if(split[i].contains("天梯奖池"))
//                continue;
//            if (split[i].startsWith("Y")) {
//                num = split[i].indexOf("-");
//
//                this.drawName = split[i].substring(num + 1) + "积分";
//                this.lotteryType = Integer.parseInt(split[i].substring(1, num));
//               // this.getImg(i, this.lotteryType, this.lotteryType == 1 ? "skin/8100226/button/B177.png" : "skin/8100226/button/B306.png");
//            } else if (split[i].startsWith("N")) {
//                num = split[i].indexOf("-");
//                num = Integer.parseInt(split[i].substring(1, num));
//                this.getImg(i, num, num == 1 ? "skin/8100226/button/B178.png" : "skin/8100226/button/B307.png");
//            } else {
//                Goodstable good = UserMessUntil.getgoodstable(new BigDecimal(split[i]));
//
//                if (good != null) {
//
//                    this.getPrizeLab()[j].setIcon(GoodsListFromServerUntil.imgpathAdaptive(good.getSkin(), 49, 49));
//
//                    MouseListener[] mouseListeners = this.getPrizeLab()[j].getMouseListeners();
//                    PrizeMouseListener listener = (PrizeMouseListener)mouseListeners[0];
//                    listener.setGoodsId(split[i]);
//                    ++j;
//                }
//            }
//        }

        this.integralLab.setText("当前积分:" + RoleData.getRoleData().getLoginResult().getScoretype(this.drawName)+"");
        this.xianyuDraw = gameBean.getMoney();
        this.moenyType = 0;
        this.goodid = null;
        if (gameBean.getPetmsg2() != null) {
            i = gameBean.getPetmsg2().indexOf("|");
            this.moenyType = Integer.parseInt(gameBean.getPetmsg2().substring(0, i));
            String msg = gameBean.getPetmsg2().substring(i + 1);
            this.goodid = !"null".equals(msg) ? new BigDecimal(msg) : null;
            StringBuffer buffer = new StringBuffer();


            if("开".equals(configure7.getCjgnkg())) {
            buffer.append("当物品不足时消耗");
            buffer.append(this.xianyuDraw);
            buffer.append(this.moenyType == 0 ? "仙玉" : "大话币");
            buffer.append("代替");
            this.hintContent.setText(buffer.toString());
          }
        }else{
            this.hintContent.setText("当物品不足时消耗" + gameBean.getMoney() + "仙玉代替");
        }

        Goodstable good = this.goodid != null ? UserMessUntil.getgoodstable(this.goodid) : null;
        if (good != null) {
            this.getConsumeGoodsImg().setIcon(GoodsListFromServerUntil.imgpathAdaptive(good.getSkin(), 49, 49));
            num = 0;

            for(int k = 0; k < GoodsListFromServerUntil.getGoodslist().length; ++k) {
                Goodstable goodstable = GoodsListFromServerUntil.getGoodslist()[k];
                if (goodstable != null && goodstable.getGoodsid().compareTo(this.goodid) == 0) {
                    num += goodstable.getUsetime();
                }
            }

            this.getConsumeGoodsNumber().setText(String.valueOf(num));
        } else {
            this.getConsumeGoodsImg().setIcon(null);
            this.getConsumeGoodsNumber().setText("");
        }

    }

    public void clearView() {
        int j;
        for(j = 0; j < this.luckyDrawNumber.length; ++j) {
            this.luckyDrawNumber[j].setText("");
            this.luckyDrawName[j].setText("");
            this.luckyDrawImg[j].setIcon(CutButtonImage.getImage("img/item/908.png", 43, 43));
            this.drawLotteryType[j] = 0;
        }

        for(j = 0; j < this.luckyDrawImg.length; ++j) {
            MouseListener[] mouseListeners1 = this.luckyDrawImg[j].getMouseListeners();
            PrizeMouseListener listener1 = (PrizeMouseListener)mouseListeners1[0];
            listener1.setGoodsId(null);
        }

        this.time = 0;
    }

    public JLabel[] getPrizeLab() {
        if (this.prizeLab == null) {
            this.prizeLab = new JLabel[5];
            String style = MyIsif.getStyle();
if ("水墨UI".equals(style)) {
    //
            	for (int i = 0; i < prizeLab.length; i++) {
                    prizeLab[i] = new JLabel();
                    prizeLab[i].setBounds(302 + i % 5 * 65, 91, 50, 50);
                    prizeLab[i].addMouseListener(new PrizeMouseListener(null));
                    prizeLab[i].setOpaque(false);
                    this.add(prizeLab[i]);
                }
            }else {
            	for(int i = 0; i < this.prizeLab.length; ++i) {
            		this.prizeLab[i] = new JLabel();
            		this.prizeLab[i].setBounds(287 + i % 5 * 68, 98, 50, 50);
            		this.prizeLab[i].addMouseListener(new PrizeMouseListener(null));
            		this.prizeLab[i].setOpaque(false);
            		this.add(this.prizeLab[i]);
            	}
            }
        }

        return this.prizeLab;
    }

    public void setPrizeLab(JLabel[] prizeLab) {
        this.prizeLab = prizeLab;
    }

    public JLabel getConsumeGoodsImg() {
    	String style = MyIsif.getStyle();
if ("水墨UI".equals(style)) {
    //
    		if (consumeGoodsImg == null) {
                consumeGoodsImg = new JLabel();
                consumeGoodsImg.setOpaque(false);
                consumeGoodsImg.setBounds(212, 381, 43, 43);
                this.add(consumeGoodsImg);
            }
    	}else {
    		if (this.consumeGoodsImg == null) {
    			this.consumeGoodsImg = new JLabel();
    			this.consumeGoodsImg.setOpaque(false);
    			this.consumeGoodsImg.setBounds(195, 413, 43, 43);
    			consumeGoodsImg.addMouseListener(new WLLMouslisten(31));
    			this.add(this.consumeGoodsImg);
    		}
    	}

        return this.consumeGoodsImg;
    }

    public void setConsumeGoodsImg(JLabel consumeGoodsImg) {
        this.consumeGoodsImg = consumeGoodsImg;
    }

    public JLabel getConsumeGoodsNumber() {
        String style = MyIsif.getStyle();
        if ("水墨UI".equals(style)) {
        if (this.consumeGoodsNumber == null) {
            this.consumeGoodsNumber = new JLabel();
            this.consumeGoodsNumber.setBounds(350, 373, 113, 16);
            this.consumeGoodsNumber.setOpaque(false);
            this.consumeGoodsNumber.setForeground(Color.white);
            this.add(this.consumeGoodsNumber);
        }
        return this.consumeGoodsNumber;
        } else {
            if (this.consumeGoodsNumber == null) {
                this.consumeGoodsNumber = new JLabel();
                this.consumeGoodsNumber.setBounds(329, 406, 113, 16);
                this.consumeGoodsNumber.setOpaque(false);
                this.consumeGoodsNumber.setForeground(Color.white);
                this.add(this.consumeGoodsNumber);
            }
            return this.consumeGoodsNumber;
        }
    }

    public void setConsumeGoodsNumber(JLabel consumeGoodsNumber) {
        this.consumeGoodsNumber = consumeGoodsNumber;
    }

    public LotteryMainBtn getOneLotteryBtn() {
    	String style = MyIsif.getStyle();
if ("水墨UI".equals(style)) {
    //
    		if (oneLotteryBtn == null) {
                oneLotteryBtn = new LotteryMainBtn("skin/8100226/newbutton/B20.png", 1, "抽奖", 10, this,null);
                oneLotteryBtn.setBounds(291, 393, 59, 24);
                this.add(oneLotteryBtn);
            }
    	}else {
    		if (this.oneLotteryBtn == null) {
    			this.oneLotteryBtn = new LotteryMainBtn("inkImg/hongmu/6026.png", 1, "抽奖", 10, this);
    			this.oneLotteryBtn.setBounds(261, 431, 68, 26);
                this.oneLotteryBtn.setForeground(Color.WHITE); // 设置字体为白色
    			this.add(this.oneLotteryBtn);
    		}
    	}

        return this.oneLotteryBtn;
    }

    public void setOneLotteryBtn(LotteryMainBtn oneLotteryBtn) {
        this.oneLotteryBtn = oneLotteryBtn;
    }

    public LotteryMainBtn getTenLotteryBtn() {
    	String style = MyIsif.getStyle();
if ("水墨UI".equals(style)) {
    //
    		if (tenLotteryBtn == null) {
                tenLotteryBtn = new LotteryMainBtn("skin/8100226/newbutton/B22.png", 1, "十连抽奖", 11, this,null);
                tenLotteryBtn.setBounds(365, 393, 99, 24);
                this.add(tenLotteryBtn);
            }
    	}else {
    		if (this.tenLotteryBtn == null) {
    			this.tenLotteryBtn = new LotteryMainBtn("inkImg/hongmu/1_png.button.btn_xy.png", 1, "十连抽奖", 11, this);
    			this.tenLotteryBtn.setBounds(341, 431, 80, 26);
                this.tenLotteryBtn.setForeground(Color.WHITE); // 设置字体为白色
    			this.add(this.tenLotteryBtn);
    		}
    	}

        return this.tenLotteryBtn;
    }

    public void setTenLotteryBtn(LotteryMainBtn tenLotteryBtn) {
        this.tenLotteryBtn = tenLotteryBtn;
    }

    public ImageIcon getIconBack() {
        return this.iconBack;
    }

    public void setIconBack(ImageIcon iconBack) {
        this.iconBack = iconBack;
    }

    public LotteryMainBtn getHelpBtn() {
        if (this.helpBtn == null) {
            this.helpBtn = new LotteryMainBtn("inkImg/hongmu/lottery/？w17,h51px.png", 1, "?", 20, this);
            this.helpBtn.setBounds(604, 195, 17, 17);
            this.add(this.helpBtn);
        }


        return this.helpBtn;
    }

    public void setHelpBtn(LotteryMainBtn helpBtn) {
        this.helpBtn = helpBtn;
    }

    public JLabel getHintCheckbox() {
        if (hintCheckbox == null) {
            hintCheckbox = new JLabel();
            hintCheckbox.setIcon(null);
            if("开".equals(configure7.getCjgnkg())) {
            hintCheckbox.setBounds(289, 424, 15, 15);
            }
            hintCheckbox.addMouseListener(new MouseAdapter() {
                @Override
                public void mousePressed(MouseEvent e) {
                    // TODO Auto-generated method stub
                    // 抽奖仙玉代替开关
                    if("开".equals(configure7.getCjgnkg())) {
                    if (hintType) {
                        hintCheckbox.setIcon(null);
                    } else {

                        hintCheckbox.setIcon(CutButtonImage.getImage("inkImg/hongmu/2/showjadesuit.png", 15, 15));
                    }
                    }

                    hintType = !hintType;
                }
            });
            this.add(hintCheckbox);
        }
        return hintCheckbox;
    }

    public void setHintCheckbox(JLabel hintCheckbox) {
        this.hintCheckbox = hintCheckbox;
    }

    public JLabel getHintContent() {
    	String style = MyIsif.getStyle();
if ("水墨UI".equals(style)) {
    //
    		if (hintContent == null) {
                hintContent = new JLabel("");
                hintContent.setBounds(308, 424, 300, 17);
                hintContent.setOpaque(false);
                hintContent.setFont(UIUtils.TEXT_FONT);
                hintContent.setForeground(Color.RED);
                this.add(hintContent);
            }
    	}else {
    		if (this.hintContent == null) {
    			this.hintContent = new JLabel("");
    			this.hintContent.setBounds(284, 458, 300, 17);
    			this.hintContent.setOpaque(false);
    			this.hintContent.setFont(UIUtils.TEXT_FONT);
    			this.hintContent.setForeground(Color.RED);
    			this.add(this.hintContent);
    		}
    	}

        return this.hintContent;
    }

    public void setHintContent(JLabel hintContent) {
        this.hintContent = hintContent;
    }

    public JLabel[] getLuckyDrawImg() {
        if (this.luckyDrawImg == null) {
            this.luckyDrawImg = new JLabel[12];
            String style = MyIsif.getStyle();
if ("水墨UI".equals(style)) {
    //
            	for (int i = 0; i < luckyDrawImg.length; i++) {
                    luckyDrawImg[i] = new JLabel();
                    luckyDrawImg[i].setOpaque(false);
                    luckyDrawImg[i].setBounds(91 + i % 6 * 90, 222 + i / 6 * 79, 43, 43);
                    luckyDrawImg[i].addMouseListener(new PrizeMouseListener(null));
                    this.add(luckyDrawImg[i]);
                }
            }else {
            	for(int i = 0; i < this.luckyDrawImg.length; ++i) {
            		this.luckyDrawImg[i] = new JLabel();
            		this.luckyDrawImg[i].setOpaque(false);
            		this.luckyDrawImg[i].setBounds(65 + i % 6 * 96, 213 + i / 6 * 100, 43, 43);
            		this.luckyDrawImg[i].addMouseListener(new PrizeMouseListener(null));
            		this.add(this.luckyDrawImg[i]);
            	}
            }
        }

        return this.luckyDrawImg;
    }

    public JLabel[] getLuckyDrawNumber() {
        if (this.luckyDrawNumber == null) {
            this.luckyDrawNumber = new JLabel[12];
            String style = MyIsif.getStyle();
if ("水墨UI".equals(style)) {
    //
            	for (int i = 0; i < luckyDrawNumber.length; i++) {
                    luckyDrawNumber[i] = new JLabel(i * 7 + "", SwingConstants.RIGHT);
                    luckyDrawNumber[i].setOpaque(false);
                    luckyDrawNumber[i].setForeground(Color.red);
                    luckyDrawNumber[i].setBounds(120 + i % 6 * 90, 222 + i / 6 * 79, 17, 8);
                    this.add(luckyDrawNumber[i]);
                }
            }else {
            	for(int i = 0; i < this.luckyDrawNumber.length; ++i) {
            		this.luckyDrawNumber[i] = new JLabel(String.valueOf(i * 7), 4);
            		this.luckyDrawNumber[i].setOpaque(false);
            		this.luckyDrawNumber[i].setForeground(Color.red);
            		this.luckyDrawNumber[i].setBounds(90 + i % 6 * 96, 248 + i / 6 * 100, 17, 8);
            		this.add(this.luckyDrawNumber[i]);
            	}
            }
        }

        return this.luckyDrawNumber;
    }

    public JLabel[] getLuckyDrawName() {
        if (this.luckyDrawName == null) {
            this.luckyDrawName = new JLabel[12];
            String style = MyIsif.getStyle();
if ("水墨UI".equals(style)) {
    //
            	for (int i = 0; i < luckyDrawName.length; i++) {
                    luckyDrawName[i] = new JLabel("九彩云龙珠", SwingConstants.CENTER);
                    luckyDrawName[i].setOpaque(false);
                    luckyDrawName[i].setForeground(UIUtils.COLOR_Wing1);
                    luckyDrawName[i].setBounds(75 + i % 6 * 90, 273 + i / 6 * 79, 75, 20);
                    this.add(luckyDrawName[i]);
                }
            }else {
            	for(int i = 0; i < this.luckyDrawName.length; ++i) {
            		this.luckyDrawName[i] = new JLabel("九彩云龙珠", 0);
            		this.luckyDrawName[i].setOpaque(false);
            		this.luckyDrawName[i].setForeground(UIUtils.COLOR_Wing1);
            		this.luckyDrawName[i].setBounds(50 + i % 6 * 96, 273 + i / 6 * 100, 75, 20);
            		this.add(this.luckyDrawName[i]);
            	}
            }
        }

        return this.luckyDrawName;
    }

    public void setLuckyDrawName(JLabel[] luckyDrawName) {
        this.luckyDrawName = luckyDrawName;
    }

    public int getLotteryType() {
        return this.lotteryType;
    }

    public void setLotteryType(int lotteryType) {
        this.lotteryType = lotteryType;
    }

    public boolean isHintType() {
        return this.hintType;
    }

    public void setHintType(boolean hintType) {
        this.hintType = hintType;
    }

    public BigDecimal getXianyuDraw() {
        if (this.xianyuDraw == null) {
            this.xianyuDraw = new BigDecimal(0);
        }

        return this.xianyuDraw;
    }

    public void setXianyuDraw(BigDecimal xianyuDraw) {
        this.xianyuDraw = xianyuDraw;
    }

    public boolean isDrawLottery() {
        return this.drawLottery;
    }

    public void setDrawLottery(boolean drawLottery) {
        this.drawLottery = drawLottery;
    }

    public int[] getDrawLotteryType() {
        if (this.drawLotteryType == null) {
            this.drawLotteryType = new int[12];

            for(int i = 0; i < this.drawLotteryType.length; ++i) {
                this.drawLotteryType[i] = 0;
            }
        }

        return this.drawLotteryType;
    }

    public void setDrawLotteryType(int[] drawLotteryType) {
        this.drawLotteryType = drawLotteryType;
    }

    public JLabel getIntegralLab() {
    	String style = MyIsif.getStyle();
if ("水墨UI".equals(style)) {
    //
    		if (integralLab == null) {
   		     integralLab = new JLabel("当前积分：0", SwingConstants.RIGHT);
   		     integralLab.setBounds(270, 38, 260, 17);
   		     integralLab.setFont(UIUtils.TEXT_FONT);
   		     integralLab.setOpaque(false);
   		     //integralLab.setForeground(UIUtils.COLOR_Draw1);
   		     integralLab.setForeground(UIUtils.COLOR_NAME16);
   		     this.add(integralLab);
   		 }
    	}else {
    		if (this.integralLab == null) {
    			this.integralLab = new JLabel("当前积分：0", 4);
    			this.integralLab.setBounds(287, 78, 260, 17);
    			this.integralLab.setFont(UIUtils.TEXT_FONT);
    			this.integralLab.setOpaque(false);
    			this.integralLab.setForeground(UIUtils.COLOR_HURTB3);
    			this.add(this.integralLab);
    		}
    	}

        return this.integralLab;
    }

    public void setIntegralLab(JLabel integralLab) {
        this.integralLab = integralLab;
    }

    public LotteryMainBtn getIntegralBtn() {
    	String style = MyIsif.getStyle();
if ("水墨UI".equals(style)) {
    //
    		if (integralBtn == null) {
	   		     integralBtn = new LotteryMainBtn("skin/8100226/button/49.png", 1, "积分兑换", 21,  this);
	   		     integralBtn.setBounds(550, 38, 68, 17);
	   		     integralBtn.setOpaque(false);
	   		     this.add(integralBtn);
	   	     }
    	}else {
    		if (this.integralBtn == null) {
    			this.integralBtn = new LotteryMainBtn("inkImg/hongmu/a7.png", 1, "积分兑换", 21, this);
    			this.integralBtn.setBounds(550, 78, 68, 17);
    			this.integralBtn.setOpaque(false);
    			this.add(this.integralBtn);
    		}
    	}

        return this.integralBtn;
    }

    public void setIntegralBtn(LotteryMainBtn integralBtn) {
        this.integralBtn = integralBtn;
    }

    public String[] getDrawGoods() {
        return this.drawGoods;
    }

    public void setDrawGoods(String[] drawGoods) {
        this.drawGoods = drawGoods;
    }

    public List<LotteryMainBtn> getMenuBtn() {
        if (this.menuBtn == null) {
            this.menuBtn = new ArrayList<>();
        }

        return this.menuBtn;
    }

    public void setMenuBtn(List<LotteryMainBtn> menuBtn) {
        this.menuBtn = menuBtn;
    }

    public int getMoenyType() {
        return this.moenyType;
    }

    public void setMoenyType(int moenyType) {
        this.moenyType = moenyType;
    }

    public BigDecimal getGoodid() {
        return this.goodid;
    }

    public void setGoodid(BigDecimal goodid) {
        this.goodid = goodid;
    }

    public String getDrawName() {
        return this.drawName;
    }

    public void setDrawName(String drawName) {
        this.drawName = drawName;
    }
}
